package com.ruoyi.app.domain.bo;

import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * APP用户提现申请业务对象 app_apply
 *
 * @author heise
 * @date 2025-12-20
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class AppApplyBo extends BaseEntity {

    /**
     * ID
     */
    private Long applyId;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 申请数量
     */
    @NotNull(message = "提现金额不能为空", groups = {AddGroup.class, EditGroup.class})
    @Range(min = 10, max = 50000, message = "提现金额不能小于10或大于50000", groups = {AddGroup.class, EditGroup.class})
    private BigDecimal balance;

    /**
     * 手续费
     */
    private BigDecimal freeBalance;

    /**
     * 实际到账
     */
    private BigDecimal realityBalance;

    /**
     * 收款方式
     */
    @NotBlank(message = "提现方式不能为空", groups = {AddGroup.class, EditGroup.class})
    private String applyType;

    /**
     * 银行名称
     */
    @NotBlank(message = "姓名不能为空", groups = {AddGroup.class, EditGroup.class})
    private String name;

    /**
     * 银行名称
     */
    @NotBlank(message = "手机号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String bankName;

    /**
     * 银行卡号
     */
    @NotBlank(message = "账号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String bankCode;

    /**
     * 状态类型[0=待处理，1=通过，2=不通过]
     */
    private String status;

    /**
     * 备注
     */
    private String remark;
}
